package com.shen.server.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class RespBean {

    private long code;
    private String message;
    private Object obj;


    /**
     * 成功返回结果
    * @date: 2022/4/10
    * @param: message
    * @return
    */
    public static RespBean success(String message){
        return new RespBean(200,message,null);
    }
    /**
    * @date: 2022/4/10 
    * @param: message
    * @param: obj
    * @return 
    */
    
    public static RespBean success(String message,Object obj){
        return new RespBean(200,message,obj);
    }

    /**
     * 失败返回
    * @date: 2022/4/10
    * @param: message
    * @return
    */
    public static RespBean error(String message){
        return new RespBean(500,message,null);
    }

    public static RespBean error(String message,Object obj){
        return new RespBean(500,message,obj);
    }

}
